package com.ants.platform.core.db.mybatis;

import org.apache.ibatis.session.ResultHandler;
import org.apache.ibatis.session.RowBounds;

import java.util.List;
import java.util.Map;


/**
 * Created by liushun on 2016/7/19.
 */
public interface MyBatisDAO {

    <E> List<E> selectList(String xmlStr);

    <E> List<E> selectList(String xmlStr, Object params);

    <E> List<E> selectList(String xmlStr, Object params, RowBounds rowBounds);


    <T> T selectOne(String xmlStr);

    <T> T selectOne(String xmlStr, Object params);


    <K, V> Map<K, V> selectMap(String xmlStr, String params);

    <K, V> Map<K, V> selectMap(String xmlStr, Object params, String str);

    <K, V> Map<K, V> selectMap(String xmlStr, Object params, String str, RowBounds rowBounds);


    void select(String xmlStr, ResultHandler resultHandler);

    void select(String xmlStr, Object params, ResultHandler resultHandler);

    void select(String xmlStr, Object params, RowBounds rowBounds, ResultHandler resultHandler);


    int insert(String xmlStr);

    int insert(String xmlStr, Object params);


    int update(String xmlStr);

    int update(String xmlStr, Object params);


    int delete(String xmlStr);

    int delete(String xmlStr, Object params);

    void batchUpdate(String xmlStr, List params);
}
